home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Experimental BBS Explossion 3
/
Experimental BBS Explossion III.iso
/
c
/
cujoct93.zip
/
1110084B
< prev
next >
Wrap
Text File
|
1993-08-10
|
546b
|
26 lines
/* menu.c: Illustrates arrays of functions */
#include <stdio.h>
/* You must provide definitions for these */
extern void retrieve(void);
extern void insert(void);
extern void update(void);
extern int show_menu(void);
main()
{
int choice;
void (*farray[])(void) = {retrieve,insert,update};
for (;;)
{
choice = show_menu();
if (choice >= 1 && choice <= 3)
farray[choice-1](); /* Process request */
else if (choice == 4)
break;
}
return 0;
}